package com.crm.pojo;

import com.alibaba.fastjson.annotation.JSONField;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;


/**
 * The persistent class for the PRODUCTION_DETAILS database table.
 * 
 */
@Entity
@Table(name="PRODUCTION_DETAILS")
@NamedQuery(name="ProductionDetail.findAll", query="SELECT p FROM ProductionDetail p")
public class ProductionDetail implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(initialValue = 1, allocationSize = 1,name="PRODUCTION_DETAILS_PID_GENERATOR", sequenceName="SEQ3")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PRODUCTION_DETAILS_PID_GENERATOR")
	private Long pid;

	@Temporal(TemporalType.DATE)
    @JSONField(format = "yyyy-MM-dd")
	private Date pbirthday;

	@Transient
	@Temporal(TemporalType.DATE)
	@JSONField(format = "yyyy-MM-dd")
	private Date startpbirthday;

	@Transient
	@Temporal(TemporalType.DATE)
	@JSONField(format = "yyyy-MM-dd")
	private Date endpbirthday;

	@Transient
	private Long startpstock;

	@Transient
	private Long endpstock;

	private Long pcategory;

	private String pcompany;

	private String pimg;

	private String pname;

	private Double poprice;
	@Transient
	private String pCategoryname;

	public String getpCategoryname() {
		return pCategoryname;
	}

	public void setpCategoryname(String pCategoryname) {
		this.pCategoryname = pCategoryname;
	}

	@Temporal(TemporalType.DATE)
    @JSONField(format = "yyyy-MM-dd")
	private Date pouttime;

	@Transient
	@Temporal(TemporalType.DATE)
	@JSONField(format = "yyyy-MM-dd")
	private Date startpouttime;

	@Transient
	@Temporal(TemporalType.DATE)
	@JSONField(format = "yyyy-MM-dd")
	private Date endpouttime;

	private Double pprice;

	@Column(name="PRODUCTION_DETAILS_IS_DEL")
	private String productionDetailsIsDel;

	private String pspec;

	private Long pstock;

	private String ptype;

	private String punit;

	private String pwunit;

	public ProductionDetail() {
	}

	public Long getStartpstock() {
		return startpstock;
	}

	public void setStartpstock(Long startpstock) {
		this.startpstock = startpstock;
	}

	public Long getEndpstock() {
		return endpstock;
	}

	public void setEndpstock(Long endpstock) {
		this.endpstock = endpstock;
	}

	public Date getStartpbirthday() {
		return startpbirthday;
	}

	public void setStartpbirthday(Date startpbirthday) {
		this.startpbirthday = startpbirthday;
	}

	public Date getEndpbirthday() {
		return endpbirthday;
	}

	public void setEndpbirthday(Date endpbirthday) {
		this.endpbirthday = endpbirthday;
	}

	public Date getStartpouttime() {
		return startpouttime;
	}

	public void setStartpouttime(Date startpouttime) {
		this.startpouttime = startpouttime;
	}

	public Date getEndpouttime() {
		return endpouttime;
	}

	public void setEndpouttime(Date endpouttime) {
		this.endpouttime = endpouttime;
	}

	public Long getPid() {
		return this.pid;
	}

	public void setPid(Long pid) {
		this.pid = pid;
	}

	public Date getPbirthday() {
		return this.pbirthday;
	}

	public void setPbirthday(Date pbirthday) {
		this.pbirthday = pbirthday;
	}

	public Long getPcategory() {
		return this.pcategory;
	}

	public void setPcategory(Long pcategory) {
		this.pcategory = pcategory;
	}

	public String getPcompany() {
		return this.pcompany;
	}

	public void setPcompany(String pcompany) {
		this.pcompany = pcompany;
	}

	public String getPimg() {
		return this.pimg;
	}

	public void setPimg(String pimg) {
		this.pimg = pimg;
	}

	public String getPname() {
		return this.pname;
	}

	public void setPname(String pname) {
		this.pname = pname;
	}

	public Double getPoprice() {
		return this.poprice;
	}

	public void setPoprice(Double poprice) {
		this.poprice = poprice;
	}

	public Date getPouttime() {
		return this.pouttime;
	}

	public void setPouttime(Date pouttime) {
		this.pouttime = pouttime;
	}

	public Double getPprice() {
		return this.pprice;
	}

	public void setPprice(Double pprice) {
		this.pprice = pprice;
	}

	public String getProductionDetailsIsDel() {
		return this.productionDetailsIsDel;
	}

	public void setProductionDetailsIsDel(String productionDetailsIsDel) {
		this.productionDetailsIsDel = productionDetailsIsDel;
	}

	public String getPspec() {
		return this.pspec;
	}

	public void setPspec(String pspec) {
		this.pspec = pspec;
	}

	public Long getPstock() {
		return pstock;
	}

	public void setPstock(Long pstock) {
		this.pstock = pstock;
	}

	public String getPtype() {
		return this.ptype;
	}

	public void setPtype(String ptype) {
		this.ptype = ptype;
	}

	public String getPunit() {
		return this.punit;
	}

	public void setPunit(String punit) {
		this.punit = punit;
	}

	public String getPwunit() {
		return this.pwunit;
	}

	public void setPwunit(String pwunit) {
		this.pwunit = pwunit;
	}

	@Override
	public String toString() {
		return "ProductionDetail{" +
				"pid=" + pid +
				", pbirthday=" + pbirthday +
				", pcategory=" + pcategory +
				", pcompany='" + pcompany + '\'' +
				", pimg='" + pimg + '\'' +
				", pname='" + pname + '\'' +
				", poprice=" + poprice +
				", pCategoryname='" + pCategoryname + '\'' +
				", pouttime=" + pouttime +
				", pprice=" + pprice +
				", productionDetailsIsDel='" + productionDetailsIsDel + '\'' +
				", pspec='" + pspec + '\'' +
				", pstock=" + pstock +
				", ptype='" + ptype + '\'' +
				", punit='" + punit + '\'' +
				", pwunit='" + pwunit + '\'' +
				'}';
	}
}